Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(reactivity): make it possible to get the computed's value in the unmounted hook #3528

Closed
wants to merge 1 commit into from

Conversation

HcySunYang
Copy link
Member

Fix: #3099

#3099 is caused by this commit 29be536, and this commit 29be536 used to solve problem #910.

In this PR, I introduced the new effect option allowInactiveRun, so that we can specify whether a side effect fn can be executed in inactive

@HcySunYang HcySunYang added the 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. label Apr 2, 2021
@yyx990803
Copy link
Member

Good job tracing this down to 29be536b1f0b7f7f7c1e6cd5a84e12bb4c48b87c - I believe that was a bad fix because the problem in #910 should be a scheduler concern instead of the reactivity module.

So I reverted the fix in 29be536b1f0b7f7f7c1e6cd5a84e12bb4c48b87c and fixed it in the scheduler instead in 03a7a73

@yyx990803 yyx990803 closed this May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

computed value becomes undefined inside onUnmounted hook unless it's accessed before
2 participants